package com.gmstu.springorm.framework;

/**
 * @author John.zhang
 * @version Id: Order, v 1.0 2020/9/1 18:57 ZhiYong Exp $
 */
public class Order {

    private boolean ascending;

    private String propertyName;

    public Order(String propertyName, boolean ascending) {
        this.ascending = ascending;
        this.propertyName = propertyName;
    }

    public static Order asc(String propertyName) {
        return new Order(propertyName, true);
    }

    public static Order desc(String propertyName) {
        return new Order(propertyName, false);
    }

}
